<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>忘记密码 - DeepSleep</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <link rel="stylesheet" href="/static/css/forget-password.css">
</head>
<body>
    <div class="forget-container">
        <div class="forget-box">
            <!-- Logo 区域 -->
            <div class="logo">
                <img src="/static/images/deepsleep_logo1.png" alt="Logo">
            </div>

            <h2 class="form-title">找回密码</h2>
            <p class="form-description">请输入您的注册邮箱，我们将发送验证码到您的邮箱</p>

            <!-- 忘记密码表单 -->
            <form class="forget-form" id="forgetForm" method="post" action="/forget_password_process">
                <!-- 错误信息占位区 -->
                <div class="error-message" id="errorMessage"></div>

                <!-- 用户邮箱输入 -->
                <div class="input-group">
                    <input type="text" id="user_mail" placeholder="请输入您的邮箱账号" name="user_mail" required>
                    <label for="user_mail"><i class="fas fa-envelope"></i></label>
                </div>

                <!-- 获取验证码按钮 -->
                <button type="button" id="getCaptchaBtn" class="btn btn-captcha">获取验证码</button>

                <!-- 邮箱验证码输入 -->
                <div class="input-group">
                    <input type="text" id="mail_captcha" placeholder="请输入邮箱验证码" name="mail_captcha" required>
                    <label for="mail_captcha"><i class="fas fa-key"></i></label>
                </div>

                <!-- 图形验证码 -->
                <div class="verification-code">
                    <div class="captcha-container">
                        <input type="text" name="captcha" placeholder="输入图形验证码" id="captcha" class="captcha-input">
                        <img src="/captcha?ts=123" id="captcha-img" onclick="reloadCaptcha()" class="captcha-image">
                    </div>
                </div>

                <!-- 提交按钮 -->
                <button type="submit" class="btn btn-submit">下一步</button>
            </form>

            <!-- 返回登录链接 -->
            <div class="links">
                <a href="/login" class="form-link">返回登录</a>
            </div>
        </div>
    </div>

    <script src="/static/js/forget-password.js"></script>
</body>
</html>